<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="PyivtbinventaListForm">

        <p:panel header="#{myBundle.ListPyivtbinventaTitle}">

            <p:dataTable id="datalist" value="#{pyivtbinventaController.items}" var="item"
                         selectionMode="single" selection="#{pyivtbinventaController.selected}"
                         rowKey="#{item.pyivtbinventaid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.pyivtbinventaid}" filterBy="#{item.pyivtbinventaid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_pyivtbinventaid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyivtbinventaid}"/>
                </p:column>
                <p:column sortBy="#{item.descripcion}" filterBy="#{item.descripcion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_descripcion}"/>
                    </f:facet>
                    <h:outputText value="#{item.descripcion}"/>
                </p:column>
                <p:column sortBy="#{item.marca}" filterBy="#{item.marca}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_marca}"/>
                    </f:facet>
                    <h:outputText value="#{item.marca}"/>
                </p:column>
                <p:column sortBy="#{item.modelo}" filterBy="#{item.modelo}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_modelo}"/>
                    </f:facet>
                    <h:outputText value="#{item.modelo}"/>
                </p:column>
                <p:column sortBy="#{item.serie}" filterBy="#{item.serie}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_serie}"/>
                    </f:facet>
                    <h:outputText value="#{item.serie}"/>
                </p:column>
                <p:column sortBy="#{item.valorpresup}" filterBy="#{item.valorpresup}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_valorpresup}"/>
                    </f:facet>
                    <h:outputText value="#{item.valorpresup}"/>
                </p:column>
                <p:column sortBy="#{item.valoradqu}" filterBy="#{item.valoradqu}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_valoradqu}"/>
                    </f:facet>
                    <h:outputText value="#{item.valoradqu}"/>
                </p:column>
                <p:column sortBy="#{item.materialpred}" filterBy="#{item.materialpred}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_materialpred}"/>
                    </f:facet>
                    <h:outputText value="#{item.materialpred}"/>
                </p:column>
                <p:column sortBy="#{item.numerofactura}" filterBy="#{item.numerofactura}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_numerofactura}"/>
                    </f:facet>
                    <h:outputText value="#{item.numerofactura}"/>
                </p:column>
                <p:column sortBy="#{item.fechacompra}" filterBy="#{item.fechacompra}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_fechacompra}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechacompra}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.caracteristicas}" filterBy="#{item.caracteristicas}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_caracteristicas}"/>
                    </f:facet>
                    <h:outputText value="#{item.caracteristicas}"/>
                </p:column>
                <p:column sortBy="#{item.refactaentrega}" filterBy="#{item.refactaentrega}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_refactaentrega}"/>
                    </f:facet>
                    <h:outputText value="#{item.refactaentrega}"/>
                </p:column>
                <p:column sortBy="#{item.codbien}" filterBy="#{item.codbien}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_codbien}"/>
                    </f:facet>
                    <h:outputText value="#{item.codbien}"/>
                </p:column>
                <p:column sortBy="#{item.fecharegistro}" filterBy="#{item.fecharegistro}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_fecharegistro}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecharegistro}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
                <p:column sortBy="#{item.scittbescunid.scittbescunid}" filterBy="#{item.scittbescunid.scittbescunid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_scittbescunid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scittbescunid.scittbescunid}"/>
                </p:column>
                <p:column sortBy="#{item.pyivtbusobienid.pyivtbusobienid}" filterBy="#{item.pyivtbusobienid.pyivtbusobienid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_pyivtbusobienid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyivtbusobienid.pyivtbusobienid}"/>
                </p:column>
                <p:column sortBy="#{item.pyivtbestabienid.pyivtbestabienid}" filterBy="#{item.pyivtbestabienid.pyivtbestabienid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_pyivtbestabienid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyivtbestabienid.pyivtbestabienid}"/>
                </p:column>
                <p:column sortBy="#{item.pyivtbcolorid.pyivtbcolorid}" filterBy="#{item.pyivtbcolorid.pyivtbcolorid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_pyivtbcolorid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyivtbcolorid.pyivtbcolorid}"/>
                </p:column>
                <p:column sortBy="#{item.pydgtbactivpoaid.descripcion}" filterBy="#{item.pydgtbactivpoaid.descripcion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyivtbinventaTitle_pydgtbactivpoaid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pydgtbactivpoaid.descripcion}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{pyivtbinventaController.prepareCreate}" update=":PyivtbinventaCreateForm" oncomplete="PyivtbinventaCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":PyivtbinventaViewForm" oncomplete="PyivtbinventaViewDialog.show()" disabled="#{empty pyivtbinventaController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":PyivtbinventaEditForm" oncomplete="PyivtbinventaEditDialog.show()" disabled="#{empty pyivtbinventaController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{pyivtbinventaController.delete}" update=":growl,datalist" disabled="#{empty pyivtbinventaController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>